/*
 * UMediaFileConverter.cpp
 *
 *  Created on: 2023年7月12日
 *      Author: terry
 */

#include "UMediaFileConverter.h"
#include "CFileConverter.h"
#include "CLog.h"
#include "CMediaFileConvService.h"


void UMediaFileConverterFactory::startup()
{
	UniMediaWriter::startup();
}

void UMediaFileConverterFactory::cleanup()
{
	UniMediaWriter::cleanup();
}

UMediaFileConverter* UMediaFileConverterFactory::create(const char* fileFormat)
{
	return new CFileConverter();
}


void UMediaFileConverterFactory::destroy(UMediaFileConverter* writer)
{
	if (writer)
	{
		writer->close();
		delete writer;
	}

}

UMediaFileConvService* UMediaFileConverterFactory::createService()
{
	return new CMediaFileConvService();
}

void UMediaFileConverterFactory::destroyService(UMediaFileConvService* svc)
{
	if (svc)
	{
		svc->close();
		delete svc;
	}
}